<?php 
// include("./Action/login_check.php");
include("./Action/config.php");
	//세션을 사용하기 위해서는 항상 session_start() 를 해줘야한다.
	session_start();
	$user_check = $_SESSION['login_user'];
	
	//현재 사용하는 ID값을 받아와서 접속이 되어있는지 항상 확인한다.
	$sql = "SELECT * FROM PARENT WHERE parent_id ='$user_check'";
	$result = mysql_query($sql);
	$row = mysql_fetch_array($result);
	$login_session = $row['parent_id'];
	
	if(!isset($login_session)){
		header("location: ./index.php");
	}  
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Lock of Han Seok-bong - User page</title>
		<script src="./Scripts/jquery-1.10.2.min.js"></script>
		<style type="text/css" media="screen">
			body {
				background-color: #EBEBEB;
				width: 900px
				margin: 0 auto;
				text-align: center;
			}
			#table_content {
				margin: 0 auto;	
			}
			#logo {
				margin-top: 50px;
			}
		</style>
	</head>
	<body>
		<img id="logo" src="./images/ic_launcher.png" />
		<br/>
		<h1>You are registered as a member</h1>
		<h1>Go to application of Han Seokbong</h1>
		<br/>
		<button id="btn_logout">LOG OUT</button>
		<hr>
		<!--
		<form action="./Action/change.php" method="get" accept-charset="utf-8">
		<p>변경할 변수이름<input name="var" type="text"/></p>
		<p>값<input name="value" type="text"/>
			<input type="submit">확인</button></p>
		</form>
			-->
		
		<?php
			// $sql = "SELECT password FROM PARENT WHERE parent_id = '111'";
			// $result = mysql_query($sql);
			// $row = mysql_fetch_array($result);
			// $pawd = $row['password'];
// 			
			// $sql = "SELECT * FROM CHILD where child_num = '1'";
			// $result = mysql_query($sql);
			// while($row = mysql_fetch_array($result)){
				// echo "<br> password : ".$pawd."</br>";
				// echo "<br> child_type : ".$row['child_type']."</br>";
				// echo "<br> child_name : ".$row['child_name']."</br>";
				// echo "<br> extra_time : ".$row['extra_time']."</br>";
				// echo "<br> limit_time : ".$row['limit_time']."</br>";
				// echo "<br> rating : ".$row['rating']."</br>";
				// echo "<br> obtain_time : ".$row['obtain_time']."</br>";
				// echo "<br> spare_time : ".$row['spare_time']."</br>";
			// } 
?>
	</body>
	<script>
		$(document).ready(function(){
			$('#btn_logout').click(function(){
				$(location).attr('href','./Action/logout.php');
			});
		});
	</script>
</html>



